// 登录和注册表单共享样式
.login-form, .register-form {
  .form-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 35px 25px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 108, 255, 0.1);
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease;

    .item {
      margin-bottom: 20px;

      .item-title {
        font-weight: 600;
        font-size: 15px;
        color: #00042d;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        
        // &::before {
        //   content: '';
        //   display: inline-block;
        //   width: 4px;
        //   height: 14px;
        //   background: linear-gradient(90deg, #006cff 0%, #009fff 100%);
        //   border-radius: 2px;
        //   margin-right: 8px;
        // }
      }

      .input-block {
        display: flex;
        align-items: center;
        width: 100%;
        height: 48px;
        padding: 0 20px;
        box-sizing: border-box;
        background: #f5f6f9;
        border-radius: 24px;
        margin-bottom: 18px;
        transition: all 0.3s ease;
        border: 1px solid transparent;
        
        &:focus-within {
          border-color: #006cff;
          box-shadow: 0 0 0 2px rgba(0, 108, 255, 0.1);
          background: #fff;
        }

        .item-input {
          width: 100%;
          height: 100%;
          padding: 0;
          background: transparent;
          border: none;
          outline: none;
          font-size: 15px;
          color: #333;
          
          &::placeholder {
            color: #aaa;
            transition: color 0.3s ease;
          }
          
          &:focus::placeholder {
            color: #ccc;
          }
        }

        .clear-icon {
          margin-left: 10px;
          cursor: pointer;
          font-size: 18px;
          color: #999;
          transition: all 0.3s ease;
          width: 18px;
          height: 18px;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 50%;

          &:hover {
            color: #333;
            background-color: #eee;
          }
        }

        .icon {
          width: 22px;
          height: 22px;
          margin-left: 10px;
          cursor: pointer;
          background: url('@/assets/images/login/m.png') no-repeat center / contain;
          transition: transform 0.3s ease;

          &:hover {
            transform: scale(1.1);
          }

          &.active {
            background: url('@/assets/images/login/m1.png') no-repeat center / contain;
          }
        }
        
        &.verification-code {
          padding: 0;
          overflow: hidden;

          .item-input {
            padding: 0 20px;
            flex: 1;
          }

          .code-button {
            height: 100%;
            padding: 0 15px;
            // background: linear-gradient(90deg, rgba(0, 108, 255, 0.1) 0%, rgba(0, 159, 255, 0.1) 100%);
            background: transparent;
            border: none;
            // border-left: 1px solid #eee;
            color: #006cff;
            font-size: 14px;
            font-weight: 500;
            white-space: nowrap;
            cursor: pointer;
            transition: all 0.3s ease;

            &:hover:not(:disabled) {
              // background: linear-gradient(90deg, rgba(0, 108, 255, 0.2) 0%, rgba(0, 159, 255, 0.2) 100%);
              background: transparent;
            }

            &:disabled {
              color: #999;
              cursor: not-allowed;
              background: #f5f5f5;
            }
          }
        }
      }
    }

    .change-password {
      text-align: right;
      font-weight: 500;
      font-size: 14px;
      color: #006cff;
      margin-bottom: 25px;
      cursor: pointer;
      transition: all 0.3s ease;
      display: inline-block;
      float: right;
      position: relative;
      &::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 1px;
        background-color: #006cff;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease;
      }
      
      &:hover {
        color: #0056cc;
        
        &::after {
          transform: scaleX(1);
          transform-origin: left;
        }
      }
    }
    
    .button-block {
      position: absolute;
      bottom: -24px;
      left: 0;
      padding: 0 25px;
      width: 100%;
      box-sizing: border-box;
      
      .button {
        width: 100%;
        height: 48px;
        background: linear-gradient(90deg, #006cff 0%, #009fff 100%);
        border-radius: 24px;
        color: #ffffff;
        font-weight: 600;
        font-size: 16px;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 108, 255, 0.3);
        
        &:hover:not(:disabled) {
          transform: translateY(-2px);
          box-shadow: 0 6px 20px rgba(0, 108, 255, 0.4);
        }
        
        &:active:not(:disabled) {
          transform: translateY(0);
          box-shadow: 0 2px 10px rgba(0, 108, 255, 0.3);
        }
        
        &:disabled {
          background: linear-gradient(90deg, #8cb8e8 0%, #8cc7e8 100%);
          cursor: not-allowed;
          box-shadow: none;
        }
      }
    }
  }
  
  .protocol {
    display: flex;
    align-items: center;
    margin-top: 35px;
    padding: 0 5px;

    .protocol-radio {
      width: 16px;
      height: 16px;
      border: 1px solid #ccc;
      border-radius: 50%;
      margin-right: 8px;
      cursor: pointer;
      position: relative;
      transition: all 0.3s ease;
      
      &:hover:not(.active) {
        border-color: #006cff;
      }

      &.active {
        background-color: #006cff;
        border-color: #006cff;
        
        &::after {
          content: '';
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          width: 6px;
          height: 6px;
          background-color: white;
          border-radius: 50%;
          animation: scaleIn 0.2s ease;
        }
      }
    }

    .protocol-text {
      font-weight: 400;
      font-size: 13px;
      color: #9aa0af;
      line-height: 1.5;

      span {
        color: #006cff;
        cursor: pointer;
        position: relative;
        transition: color 0.3s ease;
        
        &::after {
          content: '';
          position: absolute;
          bottom: -1px;
          left: 0;
          width: 100%;
          height: 1px;
          background-color: #006cff;
          transform: scaleX(0);
          transform-origin: right;
          transition: transform 0.3s ease;
        }
        
        &:hover {
          color: #0056cc;
          
          &::after {
            transform: scaleX(1);
            transform-origin: left;
          }
        }
      }
    }
  }
}

.error-message {
  color: #ff4d4f;
  font-size: 13px;
  margin-top: 15px;
  text-align: center;
  background-color: rgba(255, 77, 79, 0.1);
  padding: 8px;
  border-radius: 4px;
  animation: fadeIn 0.3s ease;
}

// 动画效果
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from { 
    transform: translate(-50%, -50%) scale(0);
  }
  to { 
    transform: translate(-50%, -50%) scale(1);
  }
}